﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

//GAME000=winbolo.yesacrossamerica.com:27501
//VERSION=1.16
//MAP=Chew Toy 3
//TYPE=Strict
//PLAYERS=0
//BASES=16
//PILLS=16
//HIDMINES=No
//PASSWORD=No
//BRAINS=yesAdv
//DELAY=0
//LIMIT=-1
//STARTTIME=1238247629

namespace WinBolo_Tracker
{
    public class Game
    {
        public Game()
        {
            this.IsNew = true;
            this.Filtered = false;
            this.Killed = false;
            this.PlayerList = new List<Player>();
        }
        public string Address { get; set; }
        public int Port { get; set; }
        public string Version { get; set; }
        public string Map { get; set; }
        public string Type { get; set; }
        public int Players { get; set; }
        public int Bases { get; set; }
        public int Pills { get; set; }
        public bool HidMines { get; set; }
        public bool Password { get; set; }
        public bool Locked { get; set; }
        public List<Player> PlayerList { get; set; }
        public string StartTime { get; set; }
        public DateTime TrackTime { get; set; }
        public bool IsNew { get; set; }
        public bool AutoStart { get; set; }
        public bool Filtered { get; set; }
        public bool Killed { get; set; }
        public bool ForceLocked { get; set; }

        public bool Compare(Game game)
        {
            return (game.Address == this.Address && game.StartTime == this.StartTime);
        }

        public bool Compare2(Game game)
        {
            return (game.Address == this.Address && game.Port == this.Port && game.Map == this.Map);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            return Address;
        }
    }
}
